package com.lex.crossgate.admin.common.job.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable;
import java.util.Date;

/**
 * 定时任务日志
 *
 * @author ZhouChenglin
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2017年8月20日 下午10:34:33
 */
@TableName("quartz_job_log")
public class QuartzJobLogEntity extends Model<QuartzJobEntity> implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 任务日志id
	 */
	@TableId("log_id")
	private String logId;
	/**
	 * 任务id
	 */
	@TableField("job_id")
	private String jobId;
	/**
	 * spring bean名称
	 */
	@TableField("bean_name")
	private String beanName;
	/**
	 * 方法名
	 */
	@TableField("method_name")
	private String methodName;
	/**
	 * 参数
	 */
	private String params;
	/**
	 * 任务状态 0：失败 1：成功
	 */
	private Integer status;
	/**
	 * 失败信息
	 */
	private String error;
	/**
	 * 耗时(单位：毫秒)
	 */
	private Integer times;
	/**
	 * 创建时间
	 */
	@TableField("gmt_create")
	private Date gmtCreate;


	public String getLogId() {
		return logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public String getBeanName() {
		return beanName;
	}

	public void setBeanName(String beanName) {
		this.beanName = beanName;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}

	public Integer getTimes() {
		return times;
	}

	public void setTimes(Integer times) {
		this.times = times;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	protected Serializable pkVal() {
		return this.logId;
	}

	public String toString() {
		return "QuartzJobLog{" +
				"logId=" + logId +
				", jobId=" + jobId +
				", beanName=" + beanName +
				", methodName=" + methodName +
				", params=" + params +
				", status=" + status +
				", error=" + error +
				", times=" + times +
				", gmtCreate=" + gmtCreate +
				"}";
	}
}
